home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / cbibcode.arc / CLEAR87.C < prev    next >
Encoding:
C/C++ Source or Header  |  1991-08-05  |  360 b   |  15 lines

  1. /* clear87.c FUNCTION, FROM P. 203 OF TURBOC BIBLE */
  2. #include<math.h>
  3. #include<float.h>
  4. main()
  5. {
  6.     float a;
  7.     double b = 1.e-40;
  8.     unsigned fpstatus;
  9.     a=b;
  10.     printf(" after underflow/inexact");
  11.     fpstatus = _clear87();
  12.     printf("status word was: %x\n", fpstatus);
  13.     fpstatus = _status87();
  14.     printf("After _clear87, status word is : %x\n", fpstatus);
  15. }